<%@page import="org.springframework.context.annotation.Bean"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="cn.egame.ext.cu.ManufactureInfo"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/main.css"  />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
	function formSubmit(){
		var td = $("#form1").find("td[name='notnone']");
		var isSubmit = true;
		for(var i = 0; i<td.length; i++){
			if($(td[i]).find("input").val() == "" || $(td[i]).find("input").val().length>50){
				$(td[i]).find("span").remove();
				$(td[i]).append("<span class='page_tip'>*必填，最多50个汉字字符</span>");
				isSubmit = false;
				return;
			}else{
				$(td[i]).find("span").remove();
			}
		}
		if(isSubmit){
			document.getElementById("form1").submit();
		}else{
			return;
		}
	}
</script>
<title>Insert title here</title>
</head>
<body>
<% String urlString = request.getContextPath() + "/tv/manufacturer/edit.do"; 
	if(request.getAttribute("bean")!=null){
		ManufactureInfo bean = (ManufactureInfo)request.getAttribute("bean");
		
	%>
<div class="matter_box">
	<div class="mt10 pt10 clearfix">
<form action=<%=urlString %> method="post" id="form1">
	<table class="table2">
	
		<tr>
			<td>厂商
				<input type=hidden name=manufactureId value=<%=bean.getManufactureId() %>>
			</td>
			<td name="notnone"><input  type=text name=cnName value=<%=bean.getCnName() %>></td>
		</tr>
		<tr>
			<td>品牌</td>
			<td name="notnone"><input type=text name=shortName value=<%=bean.getShortName() %>></td>
		</tr>
		<tr>
			<td>英文名称</td>
			<td name="notnone"><input type=text name=enName value=<%=bean.getEnName() %>></td>
		</tr>
		<tr>
			<td>英文缩写</td>
			<td name="notnone"><input type=text name=enShort value=<%=bean.getEnShort() %>></td>
		</tr>
		<tr>
			<td>备注</td>
			<td><input type=text name=remark value=<%=bean.getRemark() %>></td>
		</tr>
		<tr>
			<td colspan=2>
				<input class="btn3" type="button" value="提交" onclick="formSubmit()">
			</td>
		</tr>
	
	</table>
</form>
<% } %>
</div>
</div>
</body>
</html>